<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<title>购物车页面</title>

		<link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="../basic/css/demo.css" rel="stylesheet" type="text/css" />
		<link href="../css/cartstyle.css" rel="stylesheet" type="text/css" />
		<link href="../css/optstyle.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript" src="../js/jquery.js"></script>

	</head>

	<body>

		<!--顶部导航条 -->
		<div class="am-container header">
			<ul class="message-l">
				<div class="topMessage">
					<div class="menu-hd">
						<a href="#" target="_top" class="h">亲，请登录</a>
						<a href="#" target="_top">免费注册</a>
					</div>
				</div>
			</ul>
			<ul class="message-r">
				<div class="topMessage home">
					<div class="menu-hd"><a href="#" target="_top" class="h">商城首页</a></div>
				</div>
				<div class="topMessage my-shangcheng">
					<div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</div>
				<div class="topMessage mini-cart">
					<div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum" class="h">0</strong></a></div>
				</div>
				<div class="topMessage favorite">
					<div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
			</ul>
			</div>

			<!--悬浮搜索框-->

			<div class="nav white">
				<div class="logo"><img src="../images/logo.png" /></div>
				<div class="logoBig">
					<li><img src="../images/logobig.png" /></li>
				</div>

				<div class="search-bar pr">
					<a name="index_none_header_sysc" href="#"></a>
					<form>
						<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索" autocomplete="off">
						<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="submit">
					</form>
				</div>
			</div>

			<div class="clear"></div>

			<!--购物车 -->
			<div class="concent">

				<div id="cartTable">
  					<thead>
					<tr>
					<div class="cart-table-th">
						<div class="wp">
							<div  class="th th-chk">
								<div id="J_SelectAll1"  class="select-all J_SelectAll">
								</div>
							</div>
							<div class="th th-item">
								<div class="td-inner">商品信息</div>
							</div>
							<div class="th th-price">
								<div class="td-inner">单价</div>
							</div>
							<div class="th th-amount">
								<div class="td-inner">数量</div>
							</div>
							<div class="th th-sum">
								<div class="td-inner">总价</div>
							</div>
							<div class="th th-op">
								<div class="td-inner">操作</div>
							</div>
						</div>
					</div>
					</tr>
					</thead>
					<div class="clear"></div>

					<tr class="item-list" th:each="shopcart: ${shopcarts}">
						<div class="bundle  bundle-last ">
							<div class="bundle-main">
								<ul class="item-content clearfix">
									<li class="td td-chk">
										<div class="cart-checkbox ">
											<input class="check" id="J_CheckBox_170037950254" name="items[]" value="170037950254" type="checkbox">
											<label for="J_CheckBox_170037950254"></label>
										</div>
									</li>

									<li class="td td-item">
										<div class="item-pic">
											<a href="#" target="_blank" data-title="商品图片名" class="J_MakePoint" data-point="tbcart.8.12">
												<img src="../images/kouhong.jpg_80x80.jpg" class="itempic J_ItemImg"></a>
										</div>
										<div class="item-info">

											<br class="item-basic-info" >
												<a  class="item-title J_MakePoint">商品名字：</a></br>
												<a href="#" target="_blank" title="商品名字：" class="item-title J_MakePoint"
												   data-point="tbcart.8.11" th:text="${shopcart.productName}"></a></br>
												<a  class="item-title J_MakePoint">商品描述</a>
										</div>
									</li>

									<li class="td td-info" >
										<div class="item-props item-props-can">
											<em  class="sku-line">加购时间：</em></br>
											<em  class="sku-line"th:text="${shopcart.shopcartCreatetime}"></em>
										</div>
									</li>
									<li class="td td-price">
										<div class="item-price price-promo-promo">
											<div class="price-content">
												<div class="price-line">
													<em class="price-original">价格：</em>
												</div>
												<div class="price-line" >
													<em th:text="${shopcart.shopcartPrice}"></em>
													<!--<em class="J_Price price-now" tabindex="0" th:text="${shopcart.productId}></em>-->
												</div>
												<!--<div th:text="${shopcart.productId}"></div>-->
											</div>
										</div>
									</li>
									<li class="td td-amount">
										<div class="amount-wrapper ">
											<div class="item-amount ">
												<div class="sl">
													<!--<a class="min am-btn" name="" type="button"  th:if="${shopcart.shopcartNum} == 1" onclick="alert('已经不能再少了')">-</a>-->
													<a class="min am-btn" name="" type="button"  th:href="@{/decreaseNum(shopcart_id=${shopcart.shopcartId},userId=${session.user.userId})}">-</a>
													<span th:text="${shopcart.shopcartNum}"></span>
													<a class="add am-btn" name="" type="button"  th:href="@{/increaseNum(shopcart_id=${shopcart.shopcartId},userId=${session.user.userId})}">+</a>
												</div>
											</div>
										</div>
									</li>
									<li class="td td-sum">
										<div class="td-inner">
											<em id="totalprice"  th:text="${shopcart.shopcartNum * shopcart.shopcartPrice}"></em>
										</div>
									</li>
									<!--th:each="shopcart: ${shopcarts} 此处没有product,通过shopcart传值-->
									<li class="td td-op">
										<td>

											<a th:href="'delShopcart?shopcartId='+ ${shopcart.shopcartId}" ><button class="am-btn am-btn-danger anniu">删除</button></a>
											<a th:href="'/order/addToOrder?shopcartId='+ ${shopcart.shopcartId}+'&userAddress='+ ${session.user.userAddress}+'&userPhone='+${session.user.userPhone}">
											<button class="am-btn am-btn-danger anniu">下单</button>
											</a>

											<!--<form  method="post" action="/order/addToOrder" th:object=" ${order}">-->
										    <!--<div class="td-inner">-->


											<!--<input type="hidden" name="productId" th:value="${shopcart.productId}" >-->

											<!--<input type="hidden" name="userId" th:value="${session.user.userId}">-->
											<!--<input type="hidden" name="orderNum" th:value="${shopcart.shopcartNum}">-->

												<!--<input type="hidden" name="orderCreatetime" th:value="${shopcart.shopcartCreatetime}" >-->
											<!--<input type="hidden" name="orderState" value="1">-->
											<!--<input type="hidden" name="orderDiscount" value="1">-->
											<!--<input type="hidden" name="orderAdress" th:value="${session.user.userAddress}">-->
											<!--<input type="hidden" name="orderPhone" th:value="${session.user.userPhone}">-->

											<!--<input type="hidden" name="orderPrice" th:value="${shopcart.shopcartPrice}" >-->
											<!--<input type="hidden" name="orderSum" th:value="${shopcart.shopcartPrice*shopcart.shopcartNum}" >-->
											<!--<input type="hidden" name="productName" th:value="${shopcart.productName}" >-->
												<!--<p> </p><br>-->
												<!--<button type="submit" class="am-btn am-btn-danger anniu">下单</button>-->


										<!--</div>-->
											<!--</form>-->
										</td>
									</li>
								</ul>

							</div>

						</div>
					</tr>
					<div class="clear"></div>

					</tbody>
				</div>
				</table>

				<div class="clear"></div>

				<div class="float-bar-wrapper">
					<div id="J_SelectAll2" class="select-all J_SelectAll">
						<div class="cart-checkbox">
							<input class="check-all check" id="J_SelectAllCbx2" name="select-all" value="true" type="checkbox">
							<label for="J_SelectAllCbx2"></label>
						</div>
						<span>全选</span>
					</div>
					<div class="operations">
						<a href="#" hidefocus="true" class="deleteAll">删除</a>
						<a href="#" hidefocus="true" class="J_BatchFav">移入收藏夹</a>
					</div>
					<div class="float-bar-right">
						<div class="amount-sum">
							<span class="txt">已选商品</span>
							<em id="J_SelectedItemsCount">0</em><span class="txt">件</span>
							<div class="arrow-box">
								<span class="selected-items-arrow"></span>
								<span class="arrow"></span>
							</div>
						</div>
						<div class="price-sum">
							<span class="txt">合计:</span>
							<strong class="price">¥<em id="J_Total"></em></strong>
						</div>
						<div class="btn-area">
							<!--<a href="pay.html" id="J_Go" class="submit-btn submit-btn-disabled" aria-label="请注意如果没有选择宝贝，将无法结算">-->
								<!--<span>结&nbsp;算</span></a>-->
							<a class="submit-btn submit-btn-disabled" th:href="'/order/addAllToOrder?userId='+ ${session.user.userId}+'&userAddress='+${session.user.userAddress}+'&userPhone='+${session.user.userPhone}" >全部下单</a>
						</div>
					</div>

				</div>

				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">恒望科技</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">物流</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于恒望</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
							<em>© 2015-2025 Hengwang.com 版权所有</em>
						</p>
					</div>
				</div>

			</div>

			<!--操作页面-->

			<div class="theme-popover-mask"></div>

			<div class="theme-popover">
				<div class="theme-span"></div>
				<div class="theme-poptit h-title">
					<a href="javascript:;" title="关闭" class="close">×</a>
				</div>

			</div>
		<!--引导 -->
		<div class="navCir">
			<li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
			<li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
			<li class="active"><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>	
			<li><a href="../person/index.html"><i class="am-icon-user"></i>我的</a></li>					
		</div>
	</body>
<script>

</script>
	<script>
        var mydata= new Date();
        var tt=document.getElementById("createTime");
        tt.value = mydata.toLocaleDateString();
	</script>

</html>